package demo_0402;
import java.text.SimpleDateFormat;
import java.util.Date;
//日期格式化输出
public class DateFormat_demo {
    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        Date now = new Date();
        String nowstr = sdf.format(now);
        System.out.println("当前时间：" + nowstr);
    }
}
